package com.aspose.cells.a.d;

import com.aspose.cells.Color;
import com.aspose.cells.DateTime;

public class zfc {
   private com.aspose.cells.b.a.d.zm a;
   private zet b;

   public zfc(com.aspose.cells.b.a.d.zm var1) {
      if (var1 == null) {
         throw new IllegalArgumentException("stream");
      } else {
         this.a = var1;
      }
   }

   public com.aspose.cells.b.a.d.zm d() {
      return this.a;
   }

   public void e() throws Exception {
      this.a.a();
   }

   public void a(byte var1) throws Exception {
      this.a.a(var1);
   }

   public void a(String var1) throws Exception {
      for(int var2 = 0; var2 < var1.length(); ++var2) {
         this.a.a((byte)var1.charAt(var2));
      }

   }

   public void a(byte[] var1) throws Exception {
      byte[] var2 = var1;
      int var3 = var1.length;

      for(int var4 = 0; var4 < var3; ++var4) {
         byte var5 = var2[var4];
         this.a(com.aspose.cells.a.c.zp.c(var5 & 255));
      }

   }

   public void a(byte[] var1, int var2, int var3) throws Exception {
      this.a.b(var1, var2, var3);
   }

   public void b(String var1) throws Exception {
      this.a(var1);
      this.a(" ");
   }

   public void f() throws Exception {
      this.a("\r\n");
   }

   public void c(String var1) throws Exception {
      this.a(var1);
      this.f();
   }

   public void g() throws Exception {
      this.a("<<");
   }

   public void h() throws Exception {
      this.a(">>");
   }

   public void a(String var1, String var2) throws Exception {
      if (var2 != null && !com.aspose.cells.b.a.zv.b(var2, "")) {
         this.a(var1);
         this.a(" ");
         this.a(var2);
         this.a(" ");
      }
   }

   public void b(String var1, String var2) throws Exception {
      if (var2 != null && !com.aspose.cells.b.a.zv.b(var2, "")) {
         this.a(var1);
         if (this.i() == null) {
            this.a("(");
            this.a(var2);
            this.a(")");
         } else {
            this.a("<");
            byte[] var3 = this.i().d(var2);
            this.a(var3);
            this.a(">");
         }

      }
   }

   public void c(String var1, String var2) throws Exception {
      if (var2 != null && !com.aspose.cells.b.a.zv.b(var2, "")) {
         this.a(var1);
         if (this.i() == null) {
            this.a("(");
            this.a((byte)-2);
            this.a((byte)-1);

            for(int var3 = 0; var3 < var2.length(); ++var3) {
               char var4 = var2.charAt(var3);
               this.b((byte)(var4 >> 8 & 255));
               this.b((byte)(var4 & 255));
            }

            this.a(")");
         } else {
            this.a("<");
            byte[] var5 = this.i().c(var2);
            this.a(var5);
            this.a(">");
         }

      }
   }

   public void a(String var1, com.aspose.cells.b.a.b.zq var2) throws Exception {
      StringBuilder var3 = new StringBuilder(64);
      a(var2, var3);
      this.a(var1, com.aspose.cells.b.a.zr.a(var3));
   }

   public void a(String var1, DateTime var2) throws Exception {
      if (!DateTime.a(var2, DateTime.a)) {
         StringBuilder var3;
         if (this.i() == null) {
            var3 = new StringBuilder(16);
            a(var2, var3);
            this.a(var1, com.aspose.cells.b.a.zr.a(var3));
         } else {
            var3 = new StringBuilder(16);
            b(var2, var3);
            this.a(var1);
            this.a("<");
            byte[] var4 = this.i().d(com.aspose.cells.b.a.zr.a(var3));
            this.a(var4);
            this.a(">");
         }

      }
   }

   public void a(String var1, int var2) throws Exception {
      this.a(var1, com.aspose.cells.b.a.zo.a(var2));
   }

   public void a(String var1, float var2) throws Exception {
      StringBuilder var3 = new StringBuilder(16);
      a(var2, var3);
      this.a(var1, com.aspose.cells.b.a.zr.a(var3));
   }

   public void d(String var1) throws Exception {
      for(int var2 = 0; var2 < var1.length(); ++var2) {
         this.b((byte)var1.charAt(var2));
      }

   }

   public void b(byte[] var1) throws Exception {
      for(int var2 = 0; var2 < var1.length; ++var2) {
         this.b(var1[var2]);
      }

   }

   public void b(byte var1) throws Exception {
      switch(var1) {
      case 13:
         this.a("\\015");
         break;
      case 40:
      case 41:
      case 92:
         this.a((byte)92);
         this.a(var1);
         break;
      default:
         this.a(var1);
      }

   }

   public static void a(DateTime var0, StringBuilder var1) {
      var1.append("(D:");
      com.aspose.cells.a.c.zp.a(var0, var1);
      var1.append(')');
   }

   public static void b(DateTime var0, StringBuilder var1) {
      var1.append("D:");
      com.aspose.cells.a.c.zp.a(var0, var1);
   }

   public static void a(com.aspose.cells.b.a.b.zo var0, StringBuilder var1) {
      a(var0.d(), var1);
      var1.append(' ');
      a(var0.e(), var1);
   }

   public static void a(com.aspose.cells.b.a.b.zo[] var0, StringBuilder var1) {
      a(var0[0], var1);

      for(int var2 = 1; var2 < var0.length; ++var2) {
         var1.append(' ');
         a(var0[var2], var1);
      }

   }

   public static void a(com.aspose.cells.b.a.b.zq var0, StringBuilder var1) {
      var1.append('[');
      a(var0.j(), var1);
      var1.append(' ');
      a(var0.k(), var1);
      var1.append(' ');
      a(var0.l(), var1);
      var1.append(' ');
      a(var0.m(), var1);
      var1.append(']');
   }

   public static void a(float var0, StringBuilder var1) {
      com.aspose.cells.a.c.zp.a((double)var0, 4, var1);
   }

   public static void a(float[] var0, StringBuilder var1) {
      var1.append("[");
      a(var0[0], var1);

      for(int var2 = 1; var2 < var0.length; ++var2) {
         var1.append(' ');
         a(var0[var2], var1);
      }

      var1.append("]");
   }

   public static void a(Color var0, StringBuilder var1) {
      a((float)(var0.getR() & 255) / 255.0F, var1);
      var1.append(' ');
      a((float)(var0.getG() & 255) / 255.0F, var1);
      var1.append(' ');
      a((float)(var0.getB() & 255) / 255.0F, var1);
   }

   public zet i() {
      return this.b;
   }

   public void a(zet var1) {
      this.b = var1;
   }
}
